package com.java1412.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author java1412
 * @create 2022-08-29 16:04
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResult<T> {

    private Integer code;// 状态码
    private String message; // 消息提示
    private T data;// 泛型类型
    
    // 手工定义带两个参数的构造方法
    public CommonResult(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
